# 块和方法一般结合使用
   
def useBlock
    puts "into function"
    yield
    puts "again into function"
    yield
end
useBlock {
    statement1 = 0
    statement2 = 1
    statement3 = 2
    puts "output state1 : #{statement1}, state2 : #{statement2}, state3 : #{statement3}"
}
